<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
export default {
  mounted() {
    this.init();
  },
  methods: {
    getArtClass() {
      return this.$api.artApi.allClass();
    },
    getTag() {
      return this.$api.artApi.allTag();
    },
    async init() {
      const resList = await Promise.all([
        this.getArtClass.call(this), 
        this.getTag.call(this)
      ]);
      this.$store.commit("changeArtClass", resList[0].data.data);
      this.$store.commit("changeTag", resList[1].data.data);

    }
  }
};
</script>

<style lang="less">
@import "./style/index.less";

.clear{
  color: #bbb;
  cursor: pointer;
  margin-left: 6px;
  &:hover{
    color: #999;
  }
}
</style>
